package com.liyuhang.service;

import com.liyuhang.dao.UserDao;
import com.liyuhang.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserDao userDao;
    public boolean login(String username,String password) {

        User loginUser = userDao.findUserByUsername(username);
        return loginUser != null && loginUser.getPassword().equals(password);
    }
}
